﻿using System;
using System.Collections.Generic;
using System.Text;
using ArlesInterfaces.Editor;
using Arles.src.model.objects;

namespace Arles.src.model
{
    public class ObjectFactory
    {
        //Static Members
        static ObjectFactory handle;

        //Private Members

        //Public Members

        public static ObjectFactory Instance
        {
            get
            {
                if (handle == null)
                    handle = new ObjectFactory();

                return handle;
            }
        }

        public void CreateObject(IScene scene, ObjectType type)
        {
            switch (type)
            {
                case ObjectType.Skydome:
                    SkydomeObject sky = new SkydomeObject();
                    sky.Initialize();
                    scene.AddObject(type, sky);
                    break;
                case ObjectType.Water:
                    break;
                case ObjectType.Terrain:
                    HeightmapObject heightmap = new HeightmapObject();
                    heightmap.Initialize();
                    scene.AddObject(type, heightmap);
                    break;
                default:
                    break;
            }
        }

    }
}
